﻿using System.Configuration;
using Framework;

namespace Enterprise
{
    /// <summary>
    /// 照片配置
    /// </summary>
    public class ProjectConfig : ConfigService
    {
        static ProjectConfig()
        {
            ThumbnailWidth = ConfigurationManager.AppSettings["ProjectThumbnailWidth"].SafeToInt();
            ThumbnailHeight = ConfigurationManager.AppSettings["ProjectThumbnailHeight"].SafeToInt();
            ThumbnailPrefix = ConfigurationManager.AppSettings["ProjectThumbnailPrefix"].SafeToString();
            ImageSize = ConfigurationManager.AppSettings["ProjectImageSize"].SafeToInt();
            NormalWidth = ConfigurationManager.AppSettings["ProjectNormalWidth"].SafeToInt();
            NormalHeight = ConfigurationManager.AppSettings["ProjectNormalHeight"].SafeToInt();
            NormalPrefix = ConfigurationManager.AppSettings["ProjectNormalPrefix"].SafeToString();
            IsWaterMark = ConfigurationManager.AppSettings["IsProjectWaterMark"].SafeToBool();
            WaterMarkFileName = ConfigurationManager.AppSettings["ProjectWaterMarkFileName"].SafeToString();
            WaterMarkRelativePath = ConfigurationManager.AppSettings["ProjectWaterMarkRelativePath"].SafeToString();
            IsGenerateThumbnail = ConfigurationManager.AppSettings["IsProjectGenerateThumbnail"].SafeToBool();
            IsGenerateNormal = ConfigurationManager.AppSettings["IsProjectGenerateNormal"].SafeToBool();
            IsAdaptive = ConfigurationManager.AppSettings["IsProjectImageAdaptive"].SafeToBool();
            RelativePath = ConfigurationManager.AppSettings["ProjectImageRelativePath"].SafeToString();
        }
        public new static int ThumbnailWidth { get; set; }

        public new static int ThumbnailHeight { get; set; }

        public new static int ImageSize { get; set; }

        public new static bool IsGenerateThumbnail { get; set; }

        public new static string ThumbnailPrefix { get; set; }

        public new static bool IsWaterMark { get; set; }

        public new static string RelativePath { get; set; }

        public new static string WaterMarkFileName { get; set; }

        public new static string WaterMarkRelativePath { get; set; }

        public new static bool IsGenerateNormal { get; set; }

        public new static bool IsAdaptive { get; set; }

        public new static int NormalWidth { get; set; }

        public new static int NormalHeight { get; set; }

        public new static string NormalPrefix { get; set; }

    }
}
